package com.avic.rong.wedgit.customView;

import java.util.ArrayList;
import java.util.List;

/**
 * Creater: Created by wangyz on 2019/9/5.
 * Email: 936804097@qq.com
 */
public class ItemSearchBean {

    private int id;
    private String name;
    private boolean isShowTimeGroupLayout = true;//是否显示时间布局
    private boolean checked;
    private List<SubBean> subBeanList = new ArrayList<>();
    private List<WordBean> wordBeanList = new ArrayList<>();
    private String startTime;
    private String endTime;
    private int controlType;//控制类型
    private String value;//保存选中的value
    private String IdValue;//保存选中的id
    private int attrType;//软件需要

    //控制子adapter的属性
    private int maxCountFold = 3;
    private int spanCount = 3;
    private boolean endMoreShow = false;
    private boolean multiSelected = false;
    private boolean isFold = true;
    private SearchItermAdapter.MoreInterface moreInterface;

    //供应大厅的collapse
    private boolean collapseEnable = false;//开启塌缩模式

    public void setCollapseEnable(boolean collapseEnable) {
        this.collapseEnable = collapseEnable;
    }

    public boolean isCollapseEnable() {
        return collapseEnable;
    }


    public boolean isFold() {
        return isFold;
    }

    public void setFold(boolean fold) {
        isFold = fold;
    }

    public SearchItermAdapter.MoreInterface getMoreInterface() {
        return moreInterface;
    }

    public void setMoreInterface(SearchItermAdapter.MoreInterface moreInterface) {
        this.moreInterface = moreInterface;
    }

    public int getMaxCountFold() {
        return maxCountFold;
    }

    public void setMaxCountFold(int maxCountFold) {
        this.maxCountFold = maxCountFold;
    }

    public int getSpanCount() {
        return spanCount;
    }

    public void setSpanCount(int spanCount) {
        this.spanCount = spanCount;
    }

    public boolean isEndMoreShow() {
        return endMoreShow;
    }

    public void setEndMoreShow(boolean endMoreShow) {
        this.endMoreShow = endMoreShow;
    }

    public boolean isMultiSelected() {
        return multiSelected;
    }

    public void setMultiSelected(boolean multiSelected) {
        this.multiSelected = multiSelected;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getControlType() {
        return controlType;
    }

    public void setControlType(int controlType) {
        this.controlType = controlType;
    }

    public boolean isShowTimeGroupLayout() {
        return isShowTimeGroupLayout;
    }

    public void setShowTimeGroupLayout(boolean showTimeGroupLayout) {
        isShowTimeGroupLayout = showTimeGroupLayout;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public List<WordBean> getWordBeanList() {
        return wordBeanList;
    }

    public int getAttrType() {
        return attrType;
    }

    public void setAttrType(int attrType) {
        this.attrType = attrType;
    }

    public void setWordBeanList(List<WordBean> wordBeanList) {
        this.wordBeanList = wordBeanList;
    }

    public List<SubBean> getSubBeanList() {
        if (subBeanList == null) {
            return new ArrayList<SubBean>();
        }
        return subBeanList;
    }

    public void setSubBeanList(List<SubBean> subBeanList) {
        this.subBeanList = subBeanList;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdValue() {
        return IdValue;
    }

    public void setIdValue(String idValue) {
        IdValue = idValue;
    }


    public static class WordBean {
        private String name;
        private String value;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getValue() {
            if (value == null) value = "";
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    public static class SubBean {
        private String name;
        private boolean checked;
        private int id;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public boolean isChecked() {
            return checked;
        }

        public void setChecked(boolean checked) {
            this.checked = checked;
        }


        public List<SubBean> childList = new ArrayList<>();

        public List<SubBean> getChildList() {
            if (childList == null)
                return new ArrayList<>();
            return childList;
        }

        public void setChildList(List<SubBean> childList) {
            this.childList = childList;
        }
    }
}
